package fr.utbm.lo53;

import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.net.DatagramPacket;
import java.net.InetAddress;
import java.net.SocketException;

public class requestRssiPacket {
	private DatagramPacket packet;
	public requestRssiPacket(InetAddress Address, int Port,double x, double y, String mac, int mid) {
		ByteArrayOutputStream stream = new ByteArrayOutputStream();
        DataOutputStream data = new DataOutputStream(stream);
        try
        {
                data.writeUTF("GET;"+x+";"+y+";"+mid+";"+mac+"");
        }
        catch (IOException e)
        {
                e.printStackTrace();
        }
        
        packet = new DatagramPacket(stream.toByteArray(), stream.size(), Address, Port);

	}
	 public DatagramPacket getPacket()
     {
             return packet;
     }

}
